﻿<script type="text/javascript" src="@Url.Content("~/Content/Admin/js/jquery.validate.min.js")"></script>

<!-- start id-form -->
<table border="0" cellpadding="0" cellspacing="0" id="id-form">
    <tr>
        <th valign="top">
            Name:
        </th>
        <td>
            <input type="text" class="inp-form" id="Name" name="Name" />
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <th valign="top">
            Parent:
        </th>
        <td>
            <select id="Parent" name="Parent">
                <option value="0">Select</option>
                <option value="1">Category 1</option>
                <option value="2">Category 2</option>
                <option value="3">Category 3</option>
            </select>
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <th>
            &nbsp;
        </th>
        <td valign="top">
            <input type="submit" value="" class="form-submit" />
            <input type="reset" value="" class="form-reset" />
        </td>
        <td>
        </td>
    </tr>
</table>
<!-- end id-form  -->

<script type="text/javascript">
    $(document).ready(function () {
        $("#infoForm").validate({
            rules:
            {
                Name: { required: true }
            },
            messages:
            {
                Name: { required: 'Please input name.' }
            },
            errorElement: "div"
        })
    });
</script>